<!-- 使用平板形式展现子贴 -->

<%@page pageEncoding="UTF-8" %>
<%@page import = "java.sql.*" %>
<%@page import = "com.sxt.bbs.db.DB" %>
<%@page import = "com.sxt.bbs.entity.Article" %>
<%@page import = "java.util.List" %>
<%@page import ="java.util.ArrayList" %>

<%
List<Article> childrenArticles = new ArrayList<Article>();
String strId = null;
Article articleTemp = null;
ResultSet rs = null;
int errorCode = 0;

/*获得article.jsp传递过来的帖子的ID*/
strId = request.getParameter("rootId");
if(strId == null || strId.trim() == null) {
	errorCode = 1;//错误编号为0，error id！
	%>
		
		<jsp:forward page="error_page.jsp">
			<jsp:param name = "errorCode" value = "<%=errorCode %>" />
		</jsp:forward>
	<%
	return;
}
int rootId = 0;
try {
	rootId = Integer.parseInt(strId);
} catch(NumberFormatException e) {
	errorCode = 1;
	%>
		
		<jsp:forward page="error_page.jsp">
			<jsp:param name = "errorCode" value = "<%=errorCode %>" />
		</jsp:forward>
	<%
	return;
}

/*连接数据库*/
Connection conn = DB.getConn();
Statement stat = DB.createStat(conn);
String sql = "select * from article where rootid = " + rootId;
rs = DB.excuteQuerey(stat, sql);
while(rs.next()) {
	articleTemp = new Article();
	articleTemp.initFromRS(rs);
	childrenArticles.add(articleTemp);
}

/*关闭连接*/
DB.close(stat);
DB.close(rs);

/*如果没有拿到Article对象，作处理*/
if(articleTemp == null) {
	errorCode = 2;
	%>
		
		<jsp:forward page="error_page.jsp">
			<jsp:param name = "errorCode" value = "<%=errorCode %>" />
		</jsp:forward>
	<%
}

%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0042)http://bbs.51cto.com/thread-1139316-1.html -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>本人收集了一套零基础从Java开始到Android的学习资料 - Java论坛 -  51CTO技术论坛_中国领先的IT技术社区</title>
<meta name="MSSmartTagsPreventParsing" content="True"/>
<meta http-equiv="MSThemeCompatible" content="Yes"/>
<link href="./page_style/global.css" rel="stylesheet" type="text/css"/>
<link href="./page_style/viewthread.css" rel="stylesheet" type="text/css"/>
<link href="./page_style/map_menu.css" rel="stylesheet" type="text/css"/>
<link href="./page_style/add.css" rel="stylesheet" type="text/css"/>
<link href="./page_style/nav.css" rel="stylesheet" type="text/css"/>
<link href="./page_style/art_master_top.css" rel="stylesheet" type="text/css"/>
<link href="./page_style/shCore.css" type="text/css" rel="stylesheet"/>
<link href="./page_style/shThemeDefault.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<div class="first"> <a href="http://bbs.51cto.com/"><img src="./page_style/logo.jpg"/></a></div>

<div class="subnav_t">
  <p class="flod_btn" id="showTag"></p>
</div>
<div class="w960">
  <div class="pagebox">
    <ul>
      <li><a href="http://bbs.51cto.com/forum-133-1.html" class="pre">返回列表</a></li>
      <li><a class="abg">1</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=2">2</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=3">3</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=4">4</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=5">5</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=6">6</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=7">7</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=8">8</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=9">9</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=10">10</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=18" class="last">... 18</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=2" class="next">下一页</a></li>
    </ul>
  </div>
</div>
<div class="clear hr10"></div>
<div class="tz_main">

<%
for(int i = 0; i < childrenArticles.size(); i++) {
	Article a = childrenArticles.get(i);
%>
<table id="pid5824360" summary="pid5824360" width="100%" border="0" cellspacing="0" cellpadding="0">
  <tbody>
    <tr>
      <td class="postauthor bd4b" valign="top"><div class="popupmenu_popup userinfopanel" id="userinfo5824360_menu" style="display: none;">
          <dl>
            <dt>积分</dt>
            <dd>44&nbsp;</dd>
            <dd>当前离线 </dd>
            <dt>注册时间</dt>
            <dd>2014-12-16&nbsp;</dd>
            <dt>最后登录</dt>
            <dd>2015-1-22&nbsp;</dd>
          </dl>
          <p><a href="http://bbs.51cto.com/space-uid-9737346.html" target="_blank">论坛详细资料</a></p>
        </div>
        
        <!--标签信息-->
        
        <div class="author01 bd4b"> 查看:<span>6449</span><em>|</em>回复：<span>349</span></div>
        <cite> <a href="http://home.51cto.com/index.php?s=/space/9737346" target="_blank" id="userinfo5824360" class="dropmenu" onmouseover="showMenu(this.id)">程序_1011</a>&nbsp;<img src="./page_style/arrow.gif" class="ml5" align="middle"/> </cite>
        <div class="avatar"><img src="./page_style/avatar.php"/></div>
        <p class="post_zw">新新人类 <img src="./page_style/star_level1.gif" alt="Rank: 1"/></p>
        <dl class="profile">
          <!-- edit at 20120601 by jacena-->
          <dt>帖子</dt>
          <dd><a href="http://home.51cto.com/apps/bbs/index.php?s=/Index/index/uid/9737346" style="color:#336699;text-decoration: underline;" target="_blank">13</a>&nbsp;</dd>
          <dt>精华</dt>
          <dd><a href="http://bbs.51cto.com/digest.php?authorid=9737346" target="_blank" style="color:#336699;text-decoration: underline;">0</a>&nbsp;</dd>
          <dt>无忧币</dt>
          <dd style="color:#666666"><a style="color:#336699;text-decoration: underline;" href="http://home.51cto.com/index.php?s=/Account/credit" target="_blank" rel="523">523 </a></dd>
        </dl>
        <!-- end edit -->
        
        <p imedal="9737346" class="medalsbox"></p>
        
        <!--勋章结构需要调整-->
        
        <ul>
          <li class="space"><a href="http://pay.51cto.com/space.php?uid=9737346" target="_blank">个人空间</a></li>
          <li class="pm"><a href="http://home.51cto.com/index.php?s=/Notify/write/uid/9737346" target="_blank">发短消息</a></li>
          <li class="buddy"><a href="http://home.51cto.com/index.php?s=/space/9737346" target="_blank" id="ajax_buddy_0">家园好友</a></li>
          <li class="blog"> <a target="_blank" href="http://blog.51cto.com/blog.php?uid=9737346">他的博客</a> </li>
          <li class="online"><a target="_blank" href="http://down.51cto.com/9737346">他的资源</a></li>
          <li style="background:url(http://home.51cto.com/thumb.php?w=15&amp;h=15&amp;t=f&amp;url=http://home.51cto.com/data/uploads/20130625/15/51c94d8136342.gif) no-repeat left center;width:100px"><a target="_blank" href="http://edu.51cto.com/user/user_id-9737346.html?edu_recommend_adid=103">他的课程中心</a></li>
        </ul></td>
      <td align="center" valign="top" class="tz_right bd4"><div class="postinfo01 bd4">
          <h2 style="float: left;font-size:16px;vertical-align:middle">&nbsp;&nbsp;<strong><a title="本人收集了一套零基础从Java开始到Android的学习资料" ><%= a.getCont() %></a></strong>&nbsp;</h2>
          <p class="fr"> 
            <!-- 	<a class="sc_ico" onmouseover="this.className='sc_ico02'"   onmouseout="this.className='sc_ico'" href="javascript:favorBox('open');" title="一键收藏，随时查看，分享好友！">收藏</a> --> 
            
          </p>
        </div>
        <div class="clear"></div>
        <div class="postinfo02">
          <p class="postinfo02a">发表于&nbsp;2015-1-20 14:01&nbsp;<span>|</span>&nbsp;来自&nbsp; <a href="http://bbs.51cto.com/" target="_blank" title="">51CTO网页</a> </p>
          <p class="postinfo02b"> <a href="http://bbs.51cto.com/viewthread.php?tid=1139316&page=1&authorid=9737346" rel="nofollow">[只看他]</a> <strong id="postnum1139316" style="cursor:pointer;" > 楼主 </strong> </p>
        </div>
        <p class="postinfo03"> </p>
        <span id="postnum5824360"></span>
        <div class="postmessage defaultpost">
          <div id="ad_thread3_0"></div>
          <div id="ad_thread4_0"></div>
          <div id="postmessage_5824360" class="t_msgfont"><%=a.getCont() %><br/>
            <br/>
          </div>
          <script src="./page_style/tag.php" type="text/javascript"></script>
          <div id="post_rate_div_5824360"></div>
          <br/>
          <br/>
          <br/>
          <div style="color:#a3a3a3;font-size:12px;text-align:right;height:30px;line-height:30px;"/> 本帖最后由 yuke198907 于 2015-3-2 13:37 编辑 </div>
          <div style=""></div>
          
          <!-- add by jacena ujian--> 
          
          <!--add by jacena 相关帖子  --><!-- end jacena --> 
          
        </td>
      <td></td>
    </tr>
  </tbody>
</table>

<%
}
%>

<div class="jive-buttons">
  <table summary="Buttons" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="jive-icon"><a href="reply.jsp?id=<%=articleTemp.getId() %>&rootId=<%=articleTemp.getRootId()%>"><img src="./page_style/reply-16x16.gif" alt="回复本主题" border="0" height="16" width="16"/></a></td>
        <td class="jive-icon-label"><a id="jive-reply-thread" href="reply.jsp?id=<%=articleTemp.getId() %>&rootId=<%=articleTemp.getRootId()%>" >回复本主题</a> </td>
      </tr>
    </tbody>
  </table>
</div>

</div>
<div class="w960">
  <div class="pagebox">
    <ul>
      <li><a href="http://bbs.51cto.com/forum-133-1.html" class="pre">返回列表</a></li>
      <li><a class="abg">1</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=2">2</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=3">3</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=4">4</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=5">5</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=6">6</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=7">7</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=8">8</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=9">9</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=10">10</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=18" class="last">... 18</a></li>
      <li><a href="http://bbs.51cto.com/viewthread.php?tid=1139316&extra=&page=2" class="next">下一页</a></li>
    </ul>
  </div>
</div>
<div class="clear hr10"></div>
</body>
</html>